cmake_minimum_required(VERSION 2.6)

PROJECT(DoQuEval)

find_package(Qt4 REQUIRED)
INCLUDE( ${QT_USE_FILE} )


IF (NOT CMAKE_MODULE_PATH)
  SET(CMAKE_MODULE_PATH "${CMAKE_CURRENT_SOURCE_DIR}/cmake/Modules" CACHE PATH "Path for CMake modules")
ENDIF()

FIND_PACKAGE(DoQuMeasures REQUIRED)
FIND_PACKAGE(OCRopus REQUIRED)


SET(DOQUEVAL_EXTRA_DIRS ${DoQuMeasures_INCLUDE_DIRS} ${OCRopus_INCLUDE_DIRS})
SET(DOQUEVAL_EXTRA_LIBS ${DoQuMeasures_LIBRARIES} ${OCRopus_LIBRARIES})


FILE(
	GLOB_RECURSE
	sources
	QDoQuEval/*.cpp
)

qt4_automoc(${sources})

INCLUDE_DIRECTORIES(${DoQuMeasures_INCLUDE_DIRS})

ADD_DEFINITIONS(${DoQuMeasures_DEFINITIONS})

MESSAGE(${DoQuMeasures_LIBRARY})

ADD_EXECUTABLE(DoQuEval ${sources})
TARGET_LINK_LIBRARIES(DoQuEval  ${DoQuMeasures_LIBRARIES} ${QT_LIBRARIES} ${OCRopus_LIBRARIES})
#INSTALL(FILES ${CMAKE_CURRENT_BINARY_DIR}/DoQuEval DESTINATION bin)
